﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:local="clr-namespace:Indigo.Quibbler.Controls"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:common="clr-namespace:Indigo.Quibbler.Common"
    mc:Ignorable="d" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" x:Class="Indigo.Quibbler.Controls.SettingsControl"
    >
    <UserControl.Resources>
        <LinearGradientBrush x:Key="HorizontalSliderThumbHoverBackgroundInverted" EndPoint="0,0" StartPoint="0,1">
            <GradientStop Color="white" Offset="0"/>
            <GradientStop Color="#B8E2F9" Offset="0.5"/>
            <GradientStop Color="#B0DFF8" Offset="1"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="HorizontalSliderThumbHoverBorder" Color="#3C7FB1"/>
        <LinearGradientBrush x:Key="HorizontalSliderThumbPressedBackgroundInverted" EndPoint="0,0" StartPoint="0,1">
            <GradientStop Color="#B8E4FA" Offset="0.25"/>
            <GradientStop Color="#5EB4E3" Offset="0.5"/>
            <GradientStop Color="#4C8BB4" Offset="1"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="HorizontalSliderThumbPressedBorder" Color="#2C628B"/>
        <Geometry x:Key="SliderThumbDisabledGeometry">M -5,-10.5 L 5,-10.5 L 5,10.5 L -5,10.5 Z</Geometry>
        <Geometry x:Key="SliderPointedThumbDisabledGeometry">M 4.5,-8.5 L -4.5,-8.5 L -4.5,4.5 L -0.5,8.5 L 0.5,8.5 L 4.5,4.5 Z</Geometry>
        <LinearGradientBrush x:Key="HorizontalSliderThumbNormalBackgroundInverted" EndPoint="0,0" StartPoint="0,1">
            <GradientStop Color="White" Offset="0"/>
            <GradientStop Color="#F0EFEF" Offset="0.4"/>
            <GradientStop Color="#D6D5D5" Offset=".8"/>
        </LinearGradientBrush>
        <Geometry x:Key="SliderPointedThumbOuterBorderGeometry">M 4.5,-7.5 A 1 1 0 0 0 3.5,-8.5 L -3.5,-8.5 A 1 1 0 0 0 -4.5,-7.5 L -4.5,4.5 L -0.5,8.5 L 0.5,8.5 L 4.5,4.5 Z</Geometry>
        <Geometry x:Key="SliderPointedThumbMiddleBorderGeometry">M 3.5,-7.5 L -3.5,-7.5 L -3.5,4.5 L 0,8 L 3.5,4.5 Z</Geometry>
        <Style x:Key="HorizontalSliderUpThumbStyle" TargetType="{x:Type Thumb}">
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Height" Value="18"/>
            <Setter Property="Width" Value="10"/>
            <Setter Property="Foreground" Value="Gray"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Canvas SnapsToDevicePixels="true">
                            <Canvas.RenderTransform>
                                <TransformGroup>
                                    <TransformGroup.Children>
                                        <TransformCollection>
                                            <RotateTransform Angle="180"/>
                                            <TranslateTransform X="5" Y="9"/>
                                        </TransformCollection>
                                    </TransformGroup.Children>
                                </TransformGroup>
                            </Canvas.RenderTransform>
                            <Path x:Name="Background" Fill="#FF758FAC" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}"/>
                            <Path x:Name="InnerBorder" Stroke="{x:Null}" StrokeThickness="1" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}"/>
                            <Path x:Name="OuterBorder" Stroke="{x:Null}" StrokeThickness="1" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}"/>
                        </Canvas>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="#FF637F9D"/>
                            </Trigger>
                            <Trigger Property="IsDragging" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="#FF758FAC"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Fill" TargetName="Background" Value="#FF758FAC"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <LinearGradientBrush x:Key="HorizontalSliderThumbHoverBackground" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="white" Offset="0"/>
            <GradientStop Color="#B8E2F9" Offset="0.5"/>
            <GradientStop Color="#B0DFF8" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="HorizontalSliderThumbPressedBackground" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="#B8E4FA" Offset="0.25"/>
            <GradientStop Color="#5EB4E3" Offset="0.5"/>
            <GradientStop Color="#4C8BB4" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="HorizontalSliderThumbNormalBackground" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="White" Offset="0"/>
            <GradientStop Color="#F0EFEF" Offset="0.4"/>
            <GradientStop Color="#D6D5D5" Offset=".8"/>
        </LinearGradientBrush>
        <Style x:Key="HorizontalSliderDownThumbStyle" TargetType="{x:Type Thumb}">
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Height" Value="18"/>
            <Setter Property="Width" Value="10"/>
            <Setter Property="Foreground" Value="Gray"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Canvas SnapsToDevicePixels="true">
                            <Canvas.RenderTransform>
                                <TranslateTransform X="5" Y="9"/>
                            </Canvas.RenderTransform>
                            <Path x:Name="Background" Fill="{StaticResource HorizontalSliderThumbNormalBackground}" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}"/>
                            <Path x:Name="InnerBorder" Stroke="White" StrokeThickness="1" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}"/>
                            <Path x:Name="OuterBorder" Stroke="#FF929292" StrokeThickness="1" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}"/>
                        </Canvas>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="Foreground" Value="Blue">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="IsDragging" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbPressedBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
                                <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
                                <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
                                <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <SolidColorBrush x:Key="HorizontalSliderTrackNormalBackground" Color="#FFE7EAEA"/>
        <LinearGradientBrush x:Key="HorizontalSliderTrackNormalBorder" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="#FFAEB1AF" Offset="0.1"/>
            <GradientStop Color="White" Offset=".9"/>
        </LinearGradientBrush>
        <Style x:Key="SliderRepeatButtonStyle" TargetType="{x:Type RepeatButton}">
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                        <Rectangle Fill="Transparent"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Geometry x:Key="SliderThumbOuterBorderGeometry">M -5,-9.5 A 1 1 0 0 1 -4,-10.5 L 4,-10.5 A 1 1 0 0 1 5,-9.5 L 5,9.5 A 1 1 0 0 1 4,10.5 L -4,10.5 A 1 1 0 0 1 -5,9.5 Z</Geometry>
        <Geometry x:Key="SliderThumbMiddleBorderGeometry">M -4,-9.5 L 4,-9.5 L 4,9.5 L -4,9.5 Z</Geometry>
        <Style x:Key="HorizontalSliderThumbStyle" TargetType="{x:Type Thumb}">
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Height" Value="22"/>
            <Setter Property="Width" Value="11"/>
            <Setter Property="Foreground" Value="Gray"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Canvas SnapsToDevicePixels="true">
                            <Canvas.RenderTransform>
                                <TranslateTransform X="5.5" Y="11"/>
                            </Canvas.RenderTransform>
                            <Path x:Name="Background" Fill="{StaticResource HorizontalSliderThumbNormalBackground}" Data="{StaticResource SliderThumbOuterBorderGeometry}"/>
                            <Path x:Name="InnerBorder" Stroke="White" Data="{StaticResource SliderThumbMiddleBorderGeometry}"/>
                            <Path x:Name="OuterBorder" Stroke="#FF929292" Data="{StaticResource SliderThumbOuterBorderGeometry}"/>
                        </Canvas>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="Foreground" Value="Blue">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="IsDragging" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbPressedBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
                                <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
                                <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <LinearGradientBrush x:Key="VerticalSliderThumbHoverBackground" EndPoint="1,0" StartPoint="0,0">
            <GradientStop Color="white" Offset="0"/>
            <GradientStop Color="#B8E2F9" Offset="0.5"/>
            <GradientStop Color="#B0DFF8" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VerticalSliderThumbPressedBackground" EndPoint="1,0" StartPoint="0,0">
            <GradientStop Color="#B8E4FA" Offset="0.25"/>
            <GradientStop Color="#5EB4E3" Offset="0.5"/>
            <GradientStop Color="#4C8BB4" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VerticalSliderThumbNormalBackground" EndPoint="1,0" StartPoint="0,0">
            <GradientStop Color="White" Offset="0"/>
            <GradientStop Color="#F0EFEF" Offset="0.4"/>
            <GradientStop Color="#D6D5D5" Offset=".8"/>
        </LinearGradientBrush>
        <Style x:Key="VerticalSliderLeftThumbStyle" TargetType="{x:Type Thumb}">
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Height" Value="10"/>
            <Setter Property="Width" Value="18"/>
            <Setter Property="Foreground" Value="Gray"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Canvas SnapsToDevicePixels="true">
                            <Canvas.RenderTransform>
                                <TransformGroup>
                                    <TransformGroup.Children>
                                        <TransformCollection>
                                            <RotateTransform Angle="90"/>
                                            <TranslateTransform X="9" Y="5"/>
                                        </TransformCollection>
                                    </TransformGroup.Children>
                                </TransformGroup>
                            </Canvas.RenderTransform>
                            <Path x:Name="Background" Fill="{StaticResource VerticalSliderThumbNormalBackground}" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}"/>
                            <Path x:Name="InnerBorder" Stroke="White" StrokeThickness="1" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}"/>
                            <Path x:Name="OuterBorder" Stroke="#FF929292" StrokeThickness="1" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}"/>
                        </Canvas>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="Foreground" Value="Blue">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="IsDragging" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbPressedBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
                                <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
                                <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <LinearGradientBrush x:Key="VerticalSliderThumbHoverBackgroundInverted" EndPoint="0,0" StartPoint="1,0">
            <GradientStop Color="white" Offset="0"/>
            <GradientStop Color="#B8E2F9" Offset="0.5"/>
            <GradientStop Color="#B0DFF8" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VerticalSliderThumbPressedBackgroundInverted" EndPoint="0,0" StartPoint="1,0">
            <GradientStop Color="#B8E4FA" Offset="0.25"/>
            <GradientStop Color="#5EB4E3" Offset="0.5"/>
            <GradientStop Color="#4C8BB4" Offset="1"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="VerticalSliderThumbNormalBackgroundInverted" EndPoint="0,0" StartPoint="1,0">
            <GradientStop Color="White" Offset="0"/>
            <GradientStop Color="#F0EFEF" Offset="0.4"/>
            <GradientStop Color="#D6D5D5" Offset=".8"/>
        </LinearGradientBrush>
        <Style x:Key="VerticalSliderRightThumbStyle" TargetType="{x:Type Thumb}">
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Height" Value="10"/>
            <Setter Property="Width" Value="18"/>
            <Setter Property="Foreground" Value="Gray"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Canvas SnapsToDevicePixels="true">
                            <Canvas.RenderTransform>
                                <TransformGroup>
                                    <TransformGroup.Children>
                                        <TransformCollection>
                                            <RotateTransform Angle="-90"/>
                                            <TranslateTransform X="9" Y="5"/>
                                        </TransformCollection>
                                    </TransformGroup.Children>
                                </TransformGroup>
                            </Canvas.RenderTransform>
                            <Path x:Name="Background" Fill="{StaticResource VerticalSliderThumbNormalBackgroundInverted}" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}"/>
                            <Path x:Name="InnerBorder" Stroke="White" StrokeThickness="1" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}"/>
                            <Path x:Name="OuterBorder" Stroke="#FF929292" StrokeThickness="1" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}"/>
                        </Canvas>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackgroundInverted}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="Foreground" Value="Blue">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackgroundInverted}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="IsDragging" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbPressedBackgroundInverted}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
                                <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
                                <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <LinearGradientBrush x:Key="VerticalSliderTrackNormalBorder" EndPoint="1,0" StartPoint="0,0">
            <GradientStop Color="#FFAEB1AF" Offset="0.1"/>
            <GradientStop Color="White" Offset=".9"/>
        </LinearGradientBrush>
        <Style x:Key="VerticalSliderThumbStyle" TargetType="{x:Type Thumb}">
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Height" Value="11"/>
            <Setter Property="Width" Value="22"/>
            <Setter Property="Foreground" Value="Gray"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Canvas SnapsToDevicePixels="true">
                            <Canvas.RenderTransform>
                                <TransformGroup>
                                    <TransformGroup.Children>
                                        <TransformCollection>
                                            <RotateTransform Angle="90"/>
                                            <TranslateTransform X="11" Y="5.5"/>
                                        </TransformCollection>
                                    </TransformGroup.Children>
                                </TransformGroup>
                            </Canvas.RenderTransform>
                            <Path x:Name="Background" Fill="{StaticResource VerticalSliderThumbNormalBackground}" Data="{StaticResource SliderThumbOuterBorderGeometry}"/>
                            <Path x:Name="InnerBorder" Stroke="White" StrokeThickness="1" Data="{StaticResource SliderThumbMiddleBorderGeometry}"/>
                            <Path x:Name="OuterBorder" Stroke="#FF929292" StrokeThickness="1" Data="{StaticResource SliderThumbOuterBorderGeometry}"/>
                        </Canvas>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="Foreground" Value="Blue">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
                            </Trigger>
                            <Trigger Property="IsDragging" Value="true">
                                <Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbPressedBackground}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
                                <Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
                                <Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
                                <Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="SettingsSliderStyle" TargetType="{x:Type Slider}">
            <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Foreground" Value="#FFC4C4C4"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Slider}">
                        <Border SnapsToDevicePixels="true" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="5"/>
                                    <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                            	<Grid x:Name="grid" Grid.RowSpan="2" Margin="4,-10,4,0" Background="{TemplateBinding Background}"/>
                            	<TickBar x:Name="TopTick" Height="Auto" Visibility="Collapsed" Grid.Row="0" Fill="{TemplateBinding Foreground}" Placement="Top" Grid.RowSpan="2" Margin="0,-5,0,0" ClipToBounds="True" Opacity="0"/>
                            	<TickBar x:Name="BottomTick" Height="4" Visibility="Collapsed" Grid.Row="2" Fill="{TemplateBinding Foreground}" Placement="Bottom"/>
                            	<Border x:Name="TrackBackground" Margin="5,0" VerticalAlignment="Top" Height="4.0" Grid.Row="1" Background="#FFB0BECD" BorderThickness="1" CornerRadius="0" BorderBrush="#FFB0BECD" Opacity="0">
                            		<Canvas Margin="-6,-1">
                            			<Rectangle x:Name="PART_SelectionRange" Fill="{x:Null}" Stroke="{x:Null}" StrokeThickness="1.0" Height="4.0" Visibility="Hidden"/>
                            		</Canvas>
                            	</Border>
                            	<Border x:Name="TrackBackground_Copy" Margin="5,2,5,0" VerticalAlignment="Bottom" Height="1" Grid.Row="1" Background="#FF758FAC" BorderBrush="#FF758FAC" CornerRadius="0" Opacity="0"/>
                            	<Track x:Name="PART_Track" Grid.Row="1" Margin="0,6,0,0">
                            		<Track.DecreaseRepeatButton>
                            			<RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.DecreaseLarge}"/>
                            		</Track.DecreaseRepeatButton>
                            		<Track.IncreaseRepeatButton>
                            			<RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.IncreaseLarge}"/>
                            		</Track.IncreaseRepeatButton>
                            		<Track.Thumb>
                            			<Thumb x:Name="Thumb" Style="{StaticResource HorizontalSliderThumbStyle}"/>
                            		</Track.Thumb>
                            	</Track>
                            </Grid>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="TickPlacement" Value="TopLeft">
                                <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
                                <Setter Property="Style" TargetName="Thumb" Value="{StaticResource HorizontalSliderUpThumbStyle}"/>
                                <Setter Property="Margin" TargetName="TrackBackground" Value="5,2,5,0"/>
                                <Setter Property="Margin" TargetName="TrackBackground_Copy" Value="5,0"/>
                                <Setter Property="Background" TargetName="TrackBackground" Value="#FFCED7E0"/>
                                <Setter Property="BorderBrush" TargetName="TrackBackground" Value="#FFCED7E0"/>
                            </Trigger>
                            <Trigger Property="TickPlacement" Value="BottomRight">
                                <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
                                <Setter Property="Style" TargetName="Thumb" Value="{StaticResource HorizontalSliderDownThumbStyle}"/>
                                <Setter Property="Margin" TargetName="TrackBackground" Value="5,0,5,2"/>
                            </Trigger>
                            <Trigger Property="TickPlacement" Value="Both">
                                <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
                                <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
                            </Trigger>
                            <Trigger Property="IsSelectionRangeEnabled" Value="true">
                                <Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
                            </Trigger>
                            <Trigger Property="IsKeyboardFocused" Value="true">
                                <Setter Property="Foreground" TargetName="Thumb" Value="Blue"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <Trigger Property="Orientation" Value="Vertical">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type Slider}">
                                <Border SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition MinWidth="{TemplateBinding MinWidth}" Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                        </Grid.ColumnDefinitions>
                                        <TickBar x:Name="TopTick" Width="4" Visibility="Collapsed" Grid.Column="0" Fill="{TemplateBinding Foreground}" Placement="Left"/>
                                        <TickBar x:Name="BottomTick" Width="4" Visibility="Collapsed" Grid.Column="2" Fill="{TemplateBinding Foreground}" Placement="Right"/>
                                        <Border x:Name="TrackBackground" HorizontalAlignment="center" Margin="0,5" Width="4.0" Grid.Column="1" Background="{StaticResource HorizontalSliderTrackNormalBackground}" BorderBrush="{StaticResource VerticalSliderTrackNormalBorder}" BorderThickness="1" CornerRadius="1">
                                            <Canvas Margin="-1,-6">
                                                <Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" Width="4.0" Visibility="Hidden"/>
                                            </Canvas>
                                        </Border>
                                        <Track x:Name="PART_Track" Grid.Column="1">
                                            <Track.DecreaseRepeatButton>
                                                <RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.DecreaseLarge}"/>
                                            </Track.DecreaseRepeatButton>
                                            <Track.IncreaseRepeatButton>
                                                <RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.IncreaseLarge}"/>
                                            </Track.IncreaseRepeatButton>
                                            <Track.Thumb>
                                                <Thumb x:Name="Thumb" Style="{StaticResource VerticalSliderThumbStyle}"/>
                                            </Track.Thumb>
                                        </Track>
                                    </Grid>
                                </Border>
                                <ControlTemplate.Triggers>
                                    <Trigger Property="TickPlacement" Value="TopLeft">
                                        <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
                                        <Setter Property="Style" TargetName="Thumb" Value="{StaticResource VerticalSliderLeftThumbStyle}"/>
                                        <Setter Property="Margin" TargetName="TrackBackground" Value="2,5,0,5"/>
                                    </Trigger>
                                    <Trigger Property="TickPlacement" Value="BottomRight">
                                        <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
                                        <Setter Property="Style" TargetName="Thumb" Value="{StaticResource VerticalSliderRightThumbStyle}"/>
                                        <Setter Property="Margin" TargetName="TrackBackground" Value="0,5,2,5"/>
                                    </Trigger>
                                    <Trigger Property="TickPlacement" Value="Both">
                                        <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
                                        <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
                                    </Trigger>
                                    <Trigger Property="IsSelectionRangeEnabled" Value="true">
                                        <Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
                                    </Trigger>
                                    <Trigger Property="IsKeyboardFocused" Value="true">
                                        <Setter Property="Foreground" TargetName="Thumb" Value="Blue"/>
                                    </Trigger>
                                </ControlTemplate.Triggers>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Trigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="ComboBoxFocusVisual">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Rectangle Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="4,4,21,4" SnapsToDevicePixels="true"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="#F3F3F3" Offset="0"/>
            <GradientStop Color="#EBEBEB" Offset="0.5"/>
            <GradientStop Color="#DDDDDD" Offset="0.5"/>
            <GradientStop Color="#CDCDCD" Offset="1"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>
        <Geometry x:Key="DownArrowGeometry">M 0 0 L 3.5 4 L 7 0 Z</Geometry>
        <Style x:Key="ComboBoxReadonlyToggleButton" TargetType="{x:Type ToggleButton}">
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="ClickMode" Value="Press"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                        <Border x:Name="Chrome" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
                            <Grid HorizontalAlignment="Right" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="false"/>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <LinearGradientBrush x:Key="TextBoxBorder" EndPoint="0,20" StartPoint="0,0" MappingMode="Absolute">
            <GradientStop Color="#ABADB3" Offset="0.05"/>
            <GradientStop Color="#E2E3EA" Offset="0.07"/>
            <GradientStop Color="#E3E9EF" Offset="1"/>
        </LinearGradientBrush>
        <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="AllowDrop" Value="true"/>
            <Setter Property="MinWidth" Value="0"/>
            <Setter Property="MinHeight" Value="0"/>
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TextBox}">
                        <ScrollViewer x:Name="PART_ContentHost" Background="Transparent" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="ClickMode" Value="Press"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                        <Microsoft_Windows_Themes:ButtonChrome x:Name="Chrome" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" RoundCorners="false">
                            <Path x:Name="Arrow" Fill="Black" HorizontalAlignment="Center" Margin="0,1,0,0" VerticalAlignment="Center" Data="{StaticResource DownArrowGeometry}"/>
                        </Microsoft_Windows_Themes:ButtonChrome>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsChecked" Value="true">
                                <Setter Property="RenderPressed" TargetName="Chrome" Value="true"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Fill" TargetName="Arrow" Value="#AFAFAF"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
            <Grid x:Name="Placement" SnapsToDevicePixels="true">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Popup x:Name="PART_Popup" AllowsTransparency="true" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Grid.ColumnSpan="2">
                    <Microsoft_Windows_Themes:SystemDropShadowChrome x:Name="Shdw" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=Placement}" Color="Transparent">
                        <Border x:Name="DropDownBorder" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1">
                            <ScrollViewer>
                                <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.DirectionalNavigation="Contained"/>
                            </ScrollViewer>
                        </Border>
                    </Microsoft_Windows_Themes:SystemDropShadowChrome>
                </Popup>
                <Microsoft_Windows_Themes:ListBoxChrome x:Name="Border" Grid.ColumnSpan="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" RenderFocused="{TemplateBinding IsKeyboardFocusWithin}" RenderMouseOver="{TemplateBinding IsMouseOver}"/>
                <TextBox x:Name="PART_EditableTextBox" Margin="{TemplateBinding Padding}" Style="{StaticResource ComboBoxEditableTextBox}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"/>
                <ToggleButton Style="{StaticResource ComboBoxToggleButton}" Grid.Column="1" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
            </Grid>
            <ControlTemplate.Triggers>
                <Trigger Property="IsKeyboardFocusWithin" Value="true">
                    <Setter Property="Foreground" Value="Black"/>
                </Trigger>
                <Trigger Property="IsDropDownOpen" Value="true">
                    <Setter Property="RenderFocused" TargetName="Border" Value="true"/>
                </Trigger>
                <Trigger Property="HasItems" Value="false">
                    <Setter Property="Height" TargetName="DropDownBorder" Value="95"/>
                </Trigger>
                <Trigger Property="IsEnabled" Value="false">
                    <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                    <Setter Property="Background" Value="#FFF4F4F4"/>
                </Trigger>
                <Trigger Property="IsGrouping" Value="true">
                    <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
                </Trigger>
                <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
                    <Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/>
                    <Setter Property="Color" TargetName="Shdw" Value="#71000000"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>
        <Style x:Key="SettingsComboBoxStyle" TargetType="{x:Type ComboBox}">
            <Style.Resources>
                <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent"/>
                <SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="Transparent"/>
            </Style.Resources>
            <Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}"/>
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
            <Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
            <Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
            <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
            <Setter Property="Padding" Value="4,3"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ComboBox}">
                        <Grid x:Name="MainGrid" SnapsToDevicePixels="true">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Popup x:Name="PART_Popup" Margin="1" AllowsTransparency="true" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Grid.ColumnSpan="2" VerticalAlignment="Stretch" RenderTransformOrigin="0.5,0.5">
                                <Microsoft_Windows_Themes:SystemDropShadowChrome x:Name="Shdw" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=MainGrid}" Color="Transparent">
                                    <Border x:Name="DropDownBorder" BorderThickness="1" BorderBrush="#FF758FAC">
                                        <Border.Background>
                                            <ImageBrush ImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/DropdownListBackground.png"/>
                                        </Border.Background>
                                        <ScrollViewer CanContentScroll="true" Template="{DynamicResource SettingsScrollViewerControlTemplate}">
                                            <ItemsPresenter/>
                                        </ScrollViewer>
                                    </Border>
                                </Microsoft_Windows_Themes:SystemDropShadowChrome>
                            </Popup>
                            <ToggleButton x:Name="toggleButton" Style="{StaticResource ComboBoxReadonlyToggleButton}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="#FF758FAC" BorderThickness="1">
                                <ToggleButton.Background>
                                    <ImageBrush ImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/DropdownDefaultBackground.png"/>
                                </ToggleButton.Background>
                            </ToggleButton>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" IsHitTestVisible="false" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Content="{TemplateBinding SelectionBoxItem}" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}">
                                <!--ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"-->
                                <ContentPresenter.ContentTemplate>
                                    <DataTemplate>
                                        <Label Background="Transparent" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="15" Content="{Binding}" Foreground="#FF9AB6D4"/>
                                    </DataTemplate>
                                </ContentPresenter.ContentTemplate>
                            </ContentPresenter>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
                                <Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/>
                                <Setter Property="Color" TargetName="Shdw" Value="#71000000"/>
                            </Trigger>
                            <Trigger Property="HasItems" Value="false">
                                <Setter Property="Height" TargetName="DropDownBorder" Value="95"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                                <Setter Property="Background" Value="#FFF4F4F4"/>
                            </Trigger>
                            <Trigger Property="IsGrouping" Value="true">
                                <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <Trigger Property="IsEditable" Value="true">
                    <Setter Property="BorderBrush" Value="{StaticResource TextBoxBorder}"/>
                    <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
                    <Setter Property="IsTabStop" Value="false"/>
                    <Setter Property="Padding" Value="3"/>
                    <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}"/>
                </Trigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="NewsPreferenceComboBoxStyle" TargetType="{x:Type ComboBox}">
            <Style.Resources>
                <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent"/>
                <SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="Transparent"/>
            </Style.Resources>
            <Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}"/>
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
            <Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
            <Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
            <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
            <Setter Property="Padding" Value="4,3"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ComboBox}">
                        <Grid x:Name="MainGrid" SnapsToDevicePixels="true">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Popup x:Name="PART_Popup" Margin="1" AllowsTransparency="true" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Grid.ColumnSpan="2" VerticalAlignment="Stretch" RenderTransformOrigin="0.5,0.5">
                                <Microsoft_Windows_Themes:SystemDropShadowChrome x:Name="Shdw" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=MainGrid}" Color="Transparent">
                                    <Border x:Name="DropDownBorder" BorderThickness="1" BorderBrush="#FF758FAC">
                                        <Border.Background>
                                            <ImageBrush ImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/DropdownListBackground.png"/>
                                        </Border.Background>
                                        <ScrollViewer CanContentScroll="true" Template="{DynamicResource SettingsScrollViewerControlTemplate}">
                                            <ItemsPresenter/>
                                        </ScrollViewer>
                                    </Border>
                                </Microsoft_Windows_Themes:SystemDropShadowChrome>
                            </Popup>
                            <ToggleButton x:Name="toggleButton" Style="{StaticResource ComboBoxReadonlyToggleButton}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="#FF758FAC" BorderThickness="1">
                                <ToggleButton.Background>
                                    <ImageBrush ImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/DropdownDefaultBackground.png"/>
                                </ToggleButton.Background>
                            </ToggleButton>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" IsHitTestVisible="false" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Content="{TemplateBinding SelectionBoxItem}" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}">
                                <!--ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"-->
                                <ContentPresenter.ContentTemplate>
                                    <DataTemplate>
                                        <Label Background="Transparent" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="13" Content="{Binding}" Foreground="#FF9AB6D4"/>
                                    </DataTemplate>
                                </ContentPresenter.ContentTemplate>
                            </ContentPresenter>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
                                <Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/>
                                <Setter Property="Color" TargetName="Shdw" Value="#71000000"/>
                            </Trigger>
                            <Trigger Property="HasItems" Value="false">
                                <Setter Property="Height" TargetName="DropDownBorder" Value="95"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                                <Setter Property="Background" Value="#FFF4F4F4"/>
                            </Trigger>
                            <Trigger Property="IsGrouping" Value="true">
                                <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <Trigger Property="IsEditable" Value="true">
                    <Setter Property="BorderBrush" Value="{StaticResource TextBoxBorder}"/>
                    <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
                    <Setter Property="IsTabStop" Value="false"/>
                    <Setter Property="Padding" Value="3"/>
                    <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}"/>
                </Trigger>
            </Style.Triggers>
        </Style>
        <ControlTemplate x:Key="SettingsScrollViewerControlTemplate" TargetType="{x:Type ScrollViewer}">
            <Grid x:Name="Grid" Background="{TemplateBinding Background}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Rectangle x:Name="Corner" Fill="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Grid.Column="1" Grid.Row="1"/>
                <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Margin="{TemplateBinding Padding}" Grid.Column="0" Grid.Row="0" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False"/>
                <ScrollBar x:Name="PART_VerticalScrollBar" Cursor="Arrow" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Grid.Column="1" Grid.Row="0" AutomationProperties.AutomationId="VerticalScrollBar" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}" Style="{DynamicResource SettingsVerticalScrollBarStyle}" Width="15"/>
                <ScrollBar x:Name="PART_HorizontalScrollBar" Cursor="Arrow" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Grid.Column="0" Grid.Row="1" AutomationProperties.AutomationId="HorizontalScrollBar" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" Orientation="Horizontal" ViewportSize="{TemplateBinding ViewportWidth}"/>
            </Grid>
        </ControlTemplate>
        <LinearGradientBrush x:Key="VerticalScrollBarBackground" EndPoint="1,0" StartPoint="0,0">
            <GradientStop Color="#E1E1E1" Offset="0"/>
            <GradientStop Color="#EDEDED" Offset="0.20"/>
            <GradientStop Color="#EDEDED" Offset="0.80"/>
            <GradientStop Color="#E3E3E3" Offset="1"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="ScrollBarDisabledBackground" Color="#F4F4F4"/>
        <Style x:Key="ScrollBarButton" TargetType="{x:Type RepeatButton}">
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                        <Microsoft_Windows_Themes:ScrollChrome x:Name="Chrome" SnapsToDevicePixels="true" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" Microsoft_Windows_Themes:ScrollChrome.ScrollGlyph="{TemplateBinding Microsoft_Windows_Themes:ScrollChrome.ScrollGlyph}"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="VerticalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                        <Rectangle Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Border x:Name="border" CornerRadius="10" BorderThickness="0,1,0,0">
                            <Border.Background>
                               
								<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    						<GradientStop Color="#FF222021" Offset="0.47"/>
                    						<GradientStop Color="#FF1E2834" Offset="0.789"/>
                    						<GradientStop Color="#FF566B84" Offset="0"/>
                    						<GradientStop Color="#FF566B84" Offset="1"/>
                    					</LinearGradientBrush>
                            </Border.Background>

                        </Border>
                    	<ControlTemplate.Triggers>
                    		<Trigger Property="IsDragging" Value="True">
                    			<Setter Property="Background" TargetName="border">
                    				<Setter.Value>
                    					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF222021" Offset="0"/>
                                    <GradientStop Color="#FF1E2834" Offset="1"/>
                                    <GradientStop Color="#FF566B84" Offset="0.506"/>
                                </LinearGradientBrush>
                    				</Setter.Value>
                    			</Setter>
                    		</Trigger>
                    	</ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <LinearGradientBrush x:Key="HorizontalScrollBarBackground" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="#E1E1E1" Offset="0"/>
            <GradientStop Color="#EDEDED" Offset="0.20"/>
            <GradientStop Color="#EDEDED" Offset="0.80"/>
            <GradientStop Color="#E3E3E3" Offset="1"/>
        </LinearGradientBrush>
        <Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                        <Rectangle Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="SettingsVerticalScrollBarStyle" TargetType="{x:Type ScrollBar}">
            <Setter Property="Background" Value="{StaticResource VerticalScrollBarBackground}"/>
            <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
            <Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            <Setter Property="Width" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
            <Setter Property="MinWidth" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ScrollBar}">
                        <Grid x:Name="Bg" SnapsToDevicePixels="true" Width="15">
                            <Grid.RowDefinitions>
                                <RowDefinition MaxHeight="0"/>
                                <RowDefinition Height="0.00001*"/>
                                <RowDefinition MaxHeight="0"/>
                            </Grid.RowDefinitions>
                            <Border BorderThickness="0,1,0,0" CornerRadius="10" Background="#FFB0BDCD" Margin="0,-1,0,0" VerticalAlignment="Stretch" Width="2" Grid.RowSpan="3"/>
                            <RepeatButton Style="{StaticResource ScrollBarButton}" IsEnabled="{TemplateBinding IsMouseOver}" Microsoft_Windows_Themes:ScrollChrome.ScrollGlyph="UpArrow" Command="{x:Static ScrollBar.LineUpCommand}"/>
                            <Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="1" IsDirectionReversed="true">
                                <Track.Thumb>
                                    <Thumb Style="{StaticResource ScrollBarThumb}" Microsoft_Windows_Themes:ScrollChrome.ScrollGlyph="VerticalGripper"/>
                                </Track.Thumb>
                                <Track.IncreaseRepeatButton>
                                    <RepeatButton Style="{StaticResource VerticalScrollBarPageButton}" Command="{x:Static ScrollBar.PageDownCommand}"/>
                                </Track.IncreaseRepeatButton>
                                <Track.DecreaseRepeatButton>
                                    <RepeatButton Style="{StaticResource VerticalScrollBarPageButton}" Command="{x:Static ScrollBar.PageUpCommand}"/>
                                </Track.DecreaseRepeatButton>
                            </Track>
                            <RepeatButton Style="{StaticResource ScrollBarButton}" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="2" Microsoft_Windows_Themes:ScrollChrome.ScrollGlyph="DownArrow" Command="{x:Static ScrollBar.LineDownCommand}"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Background" TargetName="Bg" Value="{StaticResource ScrollBarDisabledBackground}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <Trigger Property="Orientation" Value="Horizontal">
                    <Setter Property="Width" Value="Auto"/>
                    <Setter Property="MinWidth" Value="0"/>
                    <Setter Property="Height" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
                    <Setter Property="MinHeight" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
                    <Setter Property="Background" Value="{StaticResource HorizontalScrollBarBackground}"/>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type ScrollBar}">
                                <Grid x:Name="Bg" SnapsToDevicePixels="true" Background="{TemplateBinding Background}">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
                                        <ColumnDefinition Width="0.00001*"/>
                                        <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
                                    </Grid.ColumnDefinitions>
                                    <RepeatButton Style="{StaticResource ScrollBarButton}" IsEnabled="{TemplateBinding IsMouseOver}" Microsoft_Windows_Themes:ScrollChrome.ScrollGlyph="LeftArrow" Command="{x:Static ScrollBar.LineLeftCommand}"/>
                                    <Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Column="1">
                                        <Track.DecreaseRepeatButton>
                                            <RepeatButton Style="{StaticResource HorizontalScrollBarPageButton}" Command="{x:Static ScrollBar.PageLeftCommand}"/>
                                        </Track.DecreaseRepeatButton>
                                        <Track.IncreaseRepeatButton>
                                            <RepeatButton Style="{StaticResource HorizontalScrollBarPageButton}" Command="{x:Static ScrollBar.PageRightCommand}"/>
                                        </Track.IncreaseRepeatButton>
                                        <Track.Thumb>
                                            <Thumb Style="{StaticResource ScrollBarThumb}" Microsoft_Windows_Themes:ScrollChrome.ScrollGlyph="HorizontalGripper"/>
                                        </Track.Thumb>
                                    </Track>
                                    <RepeatButton Style="{StaticResource ScrollBarButton}" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Column="2" Microsoft_Windows_Themes:ScrollChrome.ScrollGlyph="RightArrow" Command="{x:Static ScrollBar.LineRightCommand}"/>
                                </Grid>
                                <ControlTemplate.Triggers>
                                    <Trigger Property="IsEnabled" Value="false">
                                        <Setter Property="Background" TargetName="Bg" Value="{StaticResource ScrollBarDisabledBackground}"/>
                                    </Trigger>
                                </ControlTemplate.Triggers>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Trigger>
            </Style.Triggers>
        </Style>
        <Storyboard x:Key="sbShowSettings">
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="gridSettings" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.9"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1" KeySpline="0,0,1,1"/>
        	</DoubleAnimationUsingKeyFrames>
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="gridSettings" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.9"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1" KeySpline="0,0,1,1"/>
        	</DoubleAnimationUsingKeyFrames>
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="gridSettings" Storyboard.TargetProperty="(UIElement.Opacity)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1" KeySpline="0,0,1,1"/>
        	</DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="sbHideSettings">
		<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="gridSettings" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.9"/>
        	</DoubleAnimationUsingKeyFrames>
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="gridSettings" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.9"/>
        	</DoubleAnimationUsingKeyFrames>
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="gridSettings" Storyboard.TargetProperty="(UIElement.Opacity)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
        	</DoubleAnimationUsingKeyFrames>
        	
        </Storyboard>
		<ControlTemplate x:Key="btnSettingsTemplate" TargetType="{x:Type Button}">
            <Border x:Name="border" BorderThickness="0" CornerRadius="4" VerticalAlignment="Stretch">
                <Border.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FF2C2C2C"/>
                        <GradientStop Color="#FF1C1C1C" Offset="0.761"/>
                        <GradientStop Color="#FF2C2C2C" Offset="0.638"/>
                        <GradientStop Color="#FF4B4A4A" Offset="0.276"/>
                        <GradientStop Color="#FF474747" Offset="1"/>
                    </LinearGradientBrush>
                </Border.Background>
                <TextBlock x:Name="textBlock" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" Foreground="#FFC5C5C5" FontSize="13.333" Text="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="3,0,3,0"/>
            </Border>
        	<ControlTemplate.Triggers>
        		<Trigger Property="IsEnabled" Value="False">
        			<Setter Property="Foreground" TargetName="textBlock" Value="#FF9A9A9A"/>
        		</Trigger>
        		<Trigger Property="IsPressed" Value="True">
        			<Setter Property="Background" TargetName="border">
        				<Setter.Value>
        					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        						<GradientStop Color="#FF191718"/>
        						<GradientStop Color="#FF1C1C1C" Offset="0.843"/>
        						<GradientStop Color="Black" Offset="0.244"/>
        						<GradientStop Color="#FF282828" Offset="0.074"/>
        						<GradientStop Color="#FF5B5B5B" Offset="1"/>
        					</LinearGradientBrush>
        				</Setter.Value>
        			</Setter>
        		</Trigger>
        	</ControlTemplate.Triggers>
        </ControlTemplate>
		<local:ReadSpeedTextConverter x:Key="readSpeedTextConverter"/>
    </UserControl.Resources>
    <Grid Background="#BF000000">
        <Grid x:Name="gridSettings"  Height="600" Width="500" VerticalAlignment="Center" HorizontalAlignment="Center" RenderTransformOrigin="0.5,0.5">
        	<Grid.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</Grid.RenderTransform>
            <Grid.Background>
                <ImageBrush ImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/SettingsBackground.png"/>
            </Grid.Background>
            <Grid.RowDefinitions>
                <RowDefinition Height="100"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid Grid.Row="0">
                <Image Source="pack://application:,,/Quibbler - Universal News Reader;component/Images/SettingsTitle.png" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="20,20,0,0" Height="40" />
                <Button x:Name="btnCloseSettings" ToolTip="Close" Background="Transparent" BorderBrush="Transparent" HorizontalAlignment="Right" VerticalAlignment="Top" Height="25" Width="25" Margin="10">
                    <Button.Template>
                        <ControlTemplate TargetType="{x:Type Button}">
                            <Grid x:Name="grid">
                                <Image x:Name="Image" Source="pack://application:,,/Quibbler - Universal News Reader;component/Images/WindowClose.png" Stretch="Fill"/>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter TargetName="grid" Property="RenderTransform" >
                                        <Setter.Value>
                                            <TranslateTransform Y="1.0" X="1.0"/>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                                <Trigger Property="IsPressed" Value="True">
                                    <Setter TargetName="grid" Property="Effect" >
                                        <Setter.Value>
                                            <DropShadowEffect ShadowDepth="5"/>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter TargetName="grid" Property="RenderTransform" >
                                        <Setter.Value>
                                            <TranslateTransform Y="1.0" X="1.0"/>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                                <Trigger Property="IsEnabled" Value="false">
                                    <Setter TargetName="grid" Property="Opacity" Value="0.5"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Button.Template>
                </Button>
                <Button x:Name="btnSaveSettings" ToolTip="Save and Close" Background="Transparent" BorderBrush="Transparent" HorizontalAlignment="Right" VerticalAlignment="Top" Height="25" Width="25" Margin="0,10,40,0" Visibility="Collapsed">
                	<Button.Template>
                		<ControlTemplate TargetType="{x:Type Button}">
                			<Grid x:Name="grid">
                				<Image x:Name="Image" Source="pack://application:,,/Quibbler - Universal News Reader;component/Images/WindowMinimize.png" Stretch="Fill"/>
                			</Grid>
                			<ControlTemplate.Triggers>
                				<Trigger Property="IsMouseOver" Value="True">
                					<Setter TargetName="grid" Property="RenderTransform" >
                						<Setter.Value>
                							<TranslateTransform Y="1.0" X="1.0"/>
                						</Setter.Value>
                					</Setter>
                				</Trigger>
                				<Trigger Property="IsPressed" Value="True">
                					<Setter TargetName="grid" Property="Effect" >
                						<Setter.Value>
                							<DropShadowEffect ShadowDepth="5"/>
                						</Setter.Value>
                					</Setter>
                					<Setter TargetName="grid" Property="RenderTransform" >
                						<Setter.Value>
                							<TranslateTransform Y="1.0" X="1.0"/>
                						</Setter.Value>
                					</Setter>
                				</Trigger>
                				<Trigger Property="IsEnabled" Value="false">
                					<Setter TargetName="grid" Property="Opacity" Value="0.5"/>
                				</Trigger>
                			</ControlTemplate.Triggers>
                		</ControlTemplate>
                	</Button.Template>
                </Button>
            </Grid>
            <Grid Grid.Row="1" Margin="30,0,30,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height=".15*"/>
                    <RowDefinition Height=".15*"/>
                    <RowDefinition Height=".15*"/>
                    <RowDefinition Height=".15*"/>
                    <RowDefinition Height=".15*"/>
					<RowDefinition Height=".15*"/>
					<RowDefinition Height=".15*"/>
                    <RowDefinition Height=".15*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.Row="0" Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Right" Margin="0,0,20,0">
                    <Label VerticalAlignment="Center" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="22" Foreground="#FF758FAC" Content="update frequency" Margin="0,0,0,0"/>
                    <StackPanel Orientation="Horizontal"  Margin="0,-10,0,0" HorizontalAlignment="Right">
                        <Label VerticalAlignment="Center" HorizontalAlignment="Right" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="13" Foreground="#FFC3CCDB" Content="{Binding Value, ElementName=sliderFrequency}" Margin="0,0,-5,0"/>
                        <Label VerticalAlignment="Center" HorizontalAlignment="Right" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="13" Foreground="#FFC3CCDB" Content="minutes"/>
                    </StackPanel>
                </StackPanel>
                <Grid HorizontalAlignment="Stretch" Margin="0" VerticalAlignment="Center" Grid.Column="1" Grid.Row="0">
                    <Slider x:Name="sliderFrequency" TickPlacement="TopLeft" Minimum="5" Maximum="20" SmallChange="5" IsMoveToPointEnabled="True" IsSnapToTickEnabled="True" Style="{DynamicResource SettingsSliderStyle}" Foreground="#FF758FAC" Value="1" TickFrequency="5" LargeChange="5" Margin="20,-10,20,5" d:LayoutOverrides="Height, GridBox">
					<Slider.Background>
                        	<ImageBrush ImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/UpdateFrequency.png"/>
						</Slider.Background>
					</Slider>
                </Grid>
                <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Right" Margin="0,0,20,0">
                    <Label VerticalAlignment="Center" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="22" Foreground="#FF758FAC" Content="delete content" Margin="0,0,0,0"/>
                    <StackPanel Orientation="Horizontal"  Margin="0,-10,0,0" HorizontalAlignment="Right">
                        <Label VerticalAlignment="Center" HorizontalAlignment="Right" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="13" Foreground="#FFC3CCDB" Content="{Binding Value, ElementName=sliderDays}" Margin="0,0,-5,0" Background="{x:Null}"/>
                        <Label VerticalAlignment="Center" HorizontalAlignment="Right" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="13" Foreground="#FFC3CCDB" Content="days"/>
                    </StackPanel>
                </StackPanel>
                <Grid HorizontalAlignment="Stretch" Margin="0" VerticalAlignment="Center" Grid.Column="1" Grid.Row="1">
                    <Slider x:Name="sliderDays" TickPlacement="TopLeft" IsDirectionReversed="True" Value="1" Minimum="1" Maximum="7" TickFrequency="1" SmallChange="1" IsMoveToPointEnabled="True" IsSnapToTickEnabled="True" Style="{DynamicResource SettingsSliderStyle}" Foreground="#FF758FAC" Margin="20,-10,20,5" d:LayoutOverrides="Height, GridBox">
						<Slider.Background>
                        	<ImageBrush ImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/DeleteContentFrequency.png"/>
						</Slider.Background>
					</Slider>
                </Grid>
                <Grid Grid.Row="2" Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Right" Margin="0,-5,20,0">
                    <Label VerticalAlignment="Center" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="22" Foreground="#FF758FAC" Content="city preferences" />
                </Grid>
                <Grid Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="20,-2,20,0">
                    <ComboBox x:Name="cbCity" Style="{DynamicResource SettingsComboBoxStyle}" MaxDropDownHeight="100" BorderBrush="{x:Null}" Padding="0"
					  Text="choose your city" ToolTip="Selected city will be chose by default in City section.">
                       <ComboBox.ItemTemplate>
                            <DataTemplate>
                               <Grid>
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="5"/>
										<ColumnDefinition Width="Auto"/>
										<ColumnDefinition Width="*"/>
									</Grid.ColumnDefinitions>
									<Image Width="6" Height="9" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Source="pack://application:,,/Quibbler - Universal News Reader;component/Images/BlueBUllet.png" Margin="0,0,0,0"/>
                                	<Label Grid.Column="2" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="13"  Background="Transparent" Content="{Binding}" Foreground="#FFEEEEEE" Margin="0,0,0,0"/>
								</Grid>
                            </DataTemplate>
                        </ComboBox.ItemTemplate>
                    </ComboBox>
                </Grid>
                <Grid Grid.Row="3" Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Right" Margin="0,-10,20,0">
                    <Label VerticalAlignment="Center" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="22" Foreground="#FF758FAC" Content="default view"/>
                </Grid>
                <Grid Grid.Row="3" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="20,-10,20,0">
                    <ComboBox x:Name="cbDefaultView" Style="{DynamicResource SettingsComboBoxStyle}" MaxDropDownHeight="100" BorderBrush="{x:Null}" Padding="0" >
                        <ComboBox.ItemTemplate>
                            <DataTemplate>
								<Grid>
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="5"/>
										<ColumnDefinition Width="Auto"/>
										<ColumnDefinition Width="*"/>
									</Grid.ColumnDefinitions>
									<Image Width="6" Height="9" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Source="pack://application:,,/Quibbler - Universal News Reader;component/Images/BlueBUllet.png" Margin="0,-2,0,0"/>
                                	<Label Grid.Column="2" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="13"  Background="Transparent" Content="{Binding}" Foreground="#FFEEEEEE" Margin="0,-2,0,0"/>
								</Grid>
                            </DataTemplate>
                        </ComboBox.ItemTemplate>
                    </ComboBox>
                </Grid>
				<StackPanel Grid.Row="4" Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Right" Margin="0,0,20,0">
                    <Label VerticalAlignment="Center" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="22" Foreground="#FF758FAC" Content="reading speed" Margin="0,0,0,0"/>
                    <StackPanel Orientation="Horizontal"  Margin="0,-10,0,0" HorizontalAlignment="Right">
                        <Label VerticalAlignment="Center" HorizontalAlignment="Right" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="13" Foreground="#FFC3CCDB" Content="{Binding Value, Converter={StaticResource readSpeedTextConverter}, ElementName=sliderReadingSpeed, Mode=OneWay}" Margin="0"/>
                    </StackPanel>
                </StackPanel>
                <Grid HorizontalAlignment="Stretch" Margin="0" VerticalAlignment="Center" Grid.Column="1" Grid.Row="4">
                    <Slider x:Name="sliderReadingSpeed" TickPlacement="TopLeft" Minimum="-2" Maximum="2" SmallChange="0.5" IsMoveToPointEnabled="True" IsSnapToTickEnabled="True" Style="{DynamicResource SettingsSliderStyle}" Foreground="#FF758FAC" Margin="20,-10,20,5" d:LayoutOverrides="Height, GridBox" TickFrequency="2">
					<Slider.Background>
                        	<ImageBrush ImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/ReadingSpeed.png"/>
						</Slider.Background>
					</Slider>
                </Grid>
				<Grid Grid.Row="5" Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Right" Margin="0,-10,20,0">
                    <Label VerticalAlignment="Center" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="22" Foreground="#FF758FAC" Content="search mode"/>
                </Grid>
                <Grid Grid.Row="5" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="20,-10,20,0">
                    <ComboBox x:Name="cbSearchMode" Style="{DynamicResource SettingsComboBoxStyle}" MaxDropDownHeight="100" BorderBrush="{x:Null}" Padding="0" >
                        <ComboBox.ItemTemplate>
                            <DataTemplate>
								<Grid>
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="5"/>
										<ColumnDefinition Width="Auto"/>
										<ColumnDefinition Width="*"/>
									</Grid.ColumnDefinitions>
									<Image Width="6" Height="9" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Source="pack://application:,,/Quibbler - Universal News Reader;component/Images/BlueBUllet.png" Margin="0,-2,0,0"/>
                                	<Label Grid.Column="2" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="13"  Background="Transparent" Content="{Binding}" Foreground="#FFEEEEEE" Margin="0,-2,0,0"/>
								</Grid>
                            </DataTemplate>
                        </ComboBox.ItemTemplate>
                    </ComboBox>
                </Grid>

                <Grid Grid.Row="6" Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Right" Margin="0,-10,20,0">
                    <Label VerticalAlignment="Center" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="22" Foreground="#FF758FAC" Content="news preference"/>
                </Grid>
                <Grid Grid.Row="6" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="20,-10,20,0">
                    <ComboBox x:Name="cbNewsPreference" Style="{DynamicResource NewsPreferenceComboBoxStyle}" MaxDropDownHeight="100" BorderBrush="{x:Null}" Padding="0" >
                        <ComboBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="5"/>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <Image Width="6" Height="9" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Source="pack://application:,,/Quibbler - Universal News Reader;component/Images/BlueBUllet.png" Margin="0,-2,0,0"/>
                                    <Label Grid.Column="2" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" FontSize="11"  Background="Transparent" Content="{Binding}" Foreground="#FFEEEEEE" Margin="0,-2,0,0"/>
                                </Grid>
                            </DataTemplate>
                        </ComboBox.ItemTemplate>
                    </ComboBox>
                </Grid>

                <Button x:Name="btnDefault" Content="default" Grid.Row="7" Grid.Column="0" Template="{DynamicResource btnSettingsTemplate}" Cursor="Hand" Width="70" Margin="5,0" Height="30" VerticalAlignment="Center" HorizontalAlignment="Left"/>
				<StackPanel Orientation="Horizontal" Grid.Row="7" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Height="30">
					<Button x:Name="btnSave" Content="save" Template="{DynamicResource btnSettingsTemplate}" Cursor="Hand" Width="60" Margin="5,0"/>
					<Button x:Name="btnCancel" Content="cancel" Template="{DynamicResource btnSettingsTemplate}" Cursor="Hand" Width="60" Margin="5,0" />
					<!--Viewbox Margin="5,0">
						<common:ImageButton x:Name="btnSave" ImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/btn-save.png" HoverImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/btn-save.png" />
					</Viewbox>
					<Viewbox Margin="5,0">
						<common:ImageButton x:Name="btnCancel" ImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/btn-cancel.png" HoverImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/btn-cancel.png" />
					</Viewbox-->
				</StackPanel>
            </Grid>
        </Grid>
    </Grid>
</UserControl>
